package cn.larry.aop.config.advice;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;

/**
 * @author LarryZeal
 *
 */
@Profile("this")
@Aspect
@Component
public class ThisAdvice {
	private static Logger logger = LoggerFactory.getLogger(ThisAdvice.class);

	@Before("cn.larry.aop.config.aspect.ThisAspect.demoThis()")
	public void before(JoinPoint jp) {
		logger.info(jp.toLongString());
		logger.info(jp.toString());
	}
}
